#include<bits/stdc++.h>
using namespace std ;
const int nmax=100000+20;
int n,r[nmax],b[nmax];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int cmp=0,anss=0,head=0;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&r[i]);
    }
    sort(r+1,r+n+1);
    for(int i=1;i<=n;i++){
        if(i==1){
            cmp++;
            head++;
            b[cmp]=r[i];
        }
        else {
          if(r[i]>b[head]&&head<=cmp){
             anss++;
             head++;
          }
          cmp++;
          b[cmp]=r[i];
        }
    }

    int ans=n-anss;
    printf("%d",ans);
    return 0;
}
